export function loginInvalid(ctx) {
  return function() {
    this.$Notice.warning({
      title: '登录失效',
      desc: `登录过期，请重新登录`,
      duration: 3
    });
    this.$store.commit('logout', this);
    this.$store.commit('clearOpenedSubmenu');
    this.$store.commit('clearAllTags');
    setTimeout(() => {
      this.$router.push({
        name: 'login'
      });
    }, 3000)
  }.bind(ctx);
}